<?php
defined('IN_ADMIN') or exit('No permission resources.'); 
include $this->admin_tpl('header', 'admin');
?>

<div class="pad_10">
<div id="searchid">

</div>
</div>
<div class="pad-lr-10">
<div class="table-list comment">
	<form method="post" action="/index.php?m=comment&c=comment_admin&a=public_add_excel" enctype="multipart/form-data" style="margin-bottom: 15px;">
	    <span>导入excel表：</span><input type="file" name="file_stu"/>
	    <input type="submit" value="导入"/>
	</form>
    <table width="100%">
        <thead>
            <tr>
				<th width="16"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
				<th>姓名</th>
				<th>性别</th>
				<th>年龄</th>
				<th>毕业学校</th>
				<th>成绩</th>
				<th>志愿</th>
				<th>专业</th>
				<th>管理操作</th>
            </tr>
        </thead>
		<tbody class="add_comment">
    <?php
	if(is_array($data)) {
		foreach($data as $v) {
			$comment_info = $this->comment_db->get_one(array('commentid'=>$v['commentid']));
	?>
     <tr id="tbody_<?php echo $v['id']?>">
		<td align="center" width="16"><input class="inputcheckbox " name="ids[]" value="<?php echo $v['id'];?>" type="checkbox"></td> 
		<td align="center"><?php echo $v['name']?></td>
		<td align="center"><?php echo $v['sex']?></td>
		<td align="center"><?php echo $v['age']?></td>
		<td align="center"><?php echo $v['school']?></td>
		<td align="center"><?php echo $v['chengji']?></td>
		<td align="center"><?php echo $v['zhiyuan']?></td>
		<td align="center"><?php echo $v['zhuanye']?></td>
		<td align='center' width="72"><a href="?m=comment&c=comment_admin&a=del&ids=<?php echo $v['id']?>&tableid=<?php echo $tableid?>&dosubmit=1" onclick="return check(<?php echo $v['id']?>, -1, '<?php echo $v['commentid']?>')"><?php echo L('delete');?></a> </td>
	</tr>
     <?php }
	}
	?>
	</tbody>
     </table>
    <div id="pages"><?php echo $pages;?></div>
</div>
</form>
</div>
<script type="text/javascript">
window.top.$('#display_center_id').css('display','none');
function check(id, type, commentid) {
	if(type == -1 && !confirm('<?php echo L('are_you_sure_you_want_to_delete')?>')) {
		return false;
	}
	return true;
}
function show_tbl(obj) {
	var pdoname = $(obj).val();
	location.href='?m=comment&c=comment_admin&a=listinfo&tableid='+pdoname+'&pc_hash=<?php echo $_SESSION['pc_hash']?>';
}
function confirm_delete(){
	if(confirm('<?php echo L('confirm_delete', array('message' => L('selected')));?>')) $('#myform').submit();
}
</script>
</body>
</html>